Skip to content

Let other bricks embed the folder step without the experiment design - #27

Merged
IvanHCenalmor merged 2 commits into
mainfrom
claude/folder-step-show-design
Oct 27, 2026
Merged

IvanHCenalmor merged 2 commits into
mainfrom
claude/folder-step-show-design

Conversation

@guijacquemet

Copy link
Copy Markdown
Contributor

@IvanHCenalmor, could you review this when you have time? We won't merge it ourselves. If you're happy with it, please merge it and tag a release, so MorphoRelate can move its pin to that tag (MorphoRelate#183).

Why

MorphoRelate's "your data" notebook embeds folder_step(). Since v0.1.0, ticking "Yes, the labels are correct" there shows the Experiment design card and writes experiment_design.csv into a new <images>_MorphoBricks_Preprocessing/ folder beside the images. MorphoRelate doesn't use that file, and the card's text points to this brick's Step 3, which MorphoRelate's notebook doesn't have. The owner chose an upstream option over a workaround in MorphoRelate (27 October 2026).

Summary

  • notebook_ui: PreprocessingNotebook.folder_step takes show_design, default True. With False:

    • the Experiment design card is left out of the page;
    • confirming the labels asks nothing more and design stays None;
    • nothing is written: no experiment_design.csv, no <images>_MorphoBricks_Preprocessing/ folder;
    • the labels question drops "Step 3 can only run once the labels are confirmed", and the "What next?" boxes of steps 1 and 2 no longer send the user to the design;
    • Step 3, if a notebook shows it, doesn't wait for a design and runs without one, as run_experiment(design=None) does.

    Building the page again with the other value opens or closes the design for labels already confirmed.

  • notebook_style: ConfirmToggle.explain() replaces the text under a question.

  • Docs: plan §12 question 29, with pointers in question 26 and §10; contract §12 (Notebook row); AGENTS.md.

Notes for review

  • With the default, the page, its texts and the files it writes are unchanged. A test pins this.
  • Nothing else in step 1 writes files: the folder check and the header inspection only read (zarr opened with mode="r"), and with show_output=False the output folder is only named.
  • Two changes go a little beyond the request:
    • Step 2's "What next?" box no longer points to a hidden design.
    • Step 3 runs without a design under show_design=False. Without that, Step 3 would stay locked for good in a notebook that hides the design.
  • Tested headless only (pages built and driven by clicks); not looked at in a browser or a real JupyterLab.

Tests

  • New tests, each of which failed before the change:
    • the default page is pinned, for both the default and show_design=True;
    • with show_design=False, confirming the labels and the axes writes nothing under the experiment's parent folder;
    • with show_design=False, the card and its words are absent.
  • Python 3.11 (zarr 2.18): 922 passed, 18 skipped. Python 3.13 (zarr 3): 939 passed, 1 skipped.
  • ruff check . and ruff format --check . pass.

Generated by Claude Code

MorphoRelate's "your data" notebook embeds PreprocessingNotebook.folder_step.
From v0.1.0, confirming the labels opens the "Experiment design" card,
writes experiment_design.csv into a new <images>_MorphoBricks_Preprocessing
folder beside the image folder, and says that step 3 runs once every group
is confirmed. MorphoRelate does not use the file, and its step 3 is another
step.

folder_step takes show_design (default True). With False the card is left
out of the page; confirming the labels asks nothing, design stays None and
nothing is written (no file, no output folder). The labels question drops
"Step 3 can only run once the labels are confirmed", and the "What next?"
boxes of steps 1 and 2 no longer send the user to the design. Step 3, if
shown, does not wait for a design and runs without one, as
run_experiment(design=None). Building the page again with the other value
opens or closes the design for labels already confirmed. The default page,
its texts and its files are unchanged, pinned by a test.

ConfirmToggle gains explain() to replace the text under its question.
Nothing else in step 1 writes files: the folder check and header
inspection only read.

Tested headless (pages built, driven by clicks); not looked at in a
browser or a real JupyterLab. Decision recorded as plan section 12
question 29; contract section 12 and AGENTS.md updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017TP44aBCGzyksTpPS2FFmQ
…uestion 31

P4 and P5 took plan §12 questions 29 and 30, so this change's decision
is now question 31, with its references in plan §10 and question 26,
contract §12 and AGENTS.md. Its test confirms the image type that step 3
now waits for (P4).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
IvanHCenalmor added a commit that referenced this pull request Oct 27, 2026
PR #27 (folder step without the experiment design) takes question 31,
and goes in first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@IvanHCenalmor
IvanHCenalmor merged commit 77e7cee into main Oct 27, 2026
7 checks passed
IvanHCenalmor added a commit that referenced this pull request Oct 27, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@guijacquemet
guijacquemet deleted the claude/folder-step-show-design branch November 1, 2026 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants